// pages/material/list.js
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    materialList: [],
    auditStatus: "审核中",
    frontFile: '',
    backFile: ''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    var that = this;
    that.setData({
      auditStatus: options.auditStatus,
      frontFile: options.typename == '身份证' ? "../../images/test1.jpg" : "../../images/hk1.jpg",
      backFile: options.typename == '身份证' ? "../../images/test2.jpg" : "../../images/hk2.jpg",
    });
  },

  // 加载资料列表
  loadMaterialList: function() {
    var that = this;
    var url = app.getUrl('GetCustomerDataList');
    var header = app.getRequestHeader();
    wx.request({
      url: url,
      method: 'POST',
      data: "'BDB6CBCE-C149-E811-93EB-7427EA1A399B'",
      header: header,
      success: function(res) {
        console.log(res);
        if (res.data.success) {
          that.setData({
            materialList: res.data.data
          })
        }
      }
    })
  }
})